/**
 *@Author: QWP
 *@Description: 派车相关接口
 *@Date 2024-08-06 19:04
 */
import request from "@/http";

// 列表分页查询
export const page = async (data: object) => {
  return await request.post({
    url: "/bizz/vTDispatch/page",
    data: data,
  });
};

// 新增
export const add = async (data: object) => {
  return await request.post({
    url: "/bizz/vTDispatch",
    data: data,
  });
};

// 取消派车
export const detialDel = async (data: object) => {
  return await request.post({
    url: "/bizz/vTDispatchdetail/delete",
    data: data,
    headersType: "application/x-www-form-urlencoded",
  });
};

// 更新
export const update = async (data: object) => {
  return await request.post({
    url: "/bizz/vTDispatch/update",
    data: data,
  });
};

// 删除
export const del = async (data: Array<any>) => {
  return await request.post({
    url: "/bizz/vTDispatch/delete",
    data,
    headersType: "application/x-www-form-urlencoded",
  });
};

// 统计报表 - 本月派车人数
export const dispathNumMon = async (data: Array<any>) => {
  return await request.post({
    url: "/api/bizz/vTDispatch/dispathNumMon",
    data,
    headersType: "application/x-www-form-urlencoded",
  });
};

// 单体查询
export const query = async (id: String) => {
  return await request.get({
    url: "/bizz/vTDispatch/" + id,
  });
};

// 导出
export const download = async (data: object) => {
  return await request.download1({
    url: "/bizz/vTDispatch/export",
    data,
  });
};
